<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="" alt="" >
    <img src="" alt="">时
    <img src="" alt="" >
    <img src="" alt="" >分
    <img src="" alt="" >
    <img src="" alt="" >秒

    <script>
        setInterval(function(){
            var date=new Date()
            var h=date.getHours()
          
            var m=date.getMinutes()
          
            var s=date.getSeconds()
        
            var _date = [
			h<10?0:Math.floor(h/10), h%10,
			m<10?0:Math.floor(m/10), m%10,
			s<10?0:Math.floor(s/10), s%10
			]
		    console.log(_date);
            
            var imgs = document.getElementsByTagName("img");
		    for(var i=0; i<imgs.length; i++){
			imgs[i].src = "img/"+_date[i]+".png";
		}
        },1000)
    </script>
</body>
</html>